package com.zoe.app.entity;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author Zoe.Zhang
 * @date 2021/09/23
 * @description
 */
@Component("mycar")
public class Car {
    @Value("${car.name}")
    private String name;
    @Value("${car.color}")
    private String color;
    @Value("${car.age}")
    private Integer age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Car{" +
            "name='" + name + '\'' +
            ", color='" + color + '\'' +
            ", age=" + age +
            '}';
    }
}
